#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from typing import Union

from sqlalchemy import String
from sqlalchemy.orm import Mapped, mapped_column

from backend.app.core.models.base import Base, id_key


class DbmsParamTemplate(Base):
    """系统api"""
    __tablename__ = 'dbms_param_template'
    id: Mapped[id_key] = mapped_column(init=False)
    db_version: Mapped[int] = mapped_column(default=3306, comment='角色状态（3306 mysql 1 6379 redis 9200 es 1433 sql）')
    template_name: Mapped[str] = mapped_column(String(50), unique=True, comment='tag代码')
    db_version: Mapped[str] = mapped_column(String(50), unique=True, comment='tag代码')
    status: Mapped[int] = mapped_column(default=1, comment='角色状态（0停用 1正常）')
    remark: Mapped[str | None] = mapped_column(String(255), comment='备注')


